Size inspection/measurement method and size inspection/measurement apparatus

ABSTRACT

In a size inspection method and a size inspection apparatus, even when a measurement object has a contour having sizes not to be easily measured and having a contour not to be easily determined, the contour and the sizes can be determined. A contour of the inspection or measurement object is detected, and positions detected are registered to constitute a group of registered positions. At measurement or inspection, a comparison is conducted with the group of registered positions in a measurement direction to extract correlation data within a measurement range. A position having highest correlation with the group of registered positions is set as a position on one side of a size measurement location. Resultantly, sizes are measured and a contour is inspected.

BACKGROUND OF THE INVENTION

[0001] The present invention relates to a method of and an apparatus forinspecting or measuring a size of an object in a contactless mannerusing, for example, a two-dimensional sensor such as a video camera, andin particular, to a size inspection or measurement method and a sizeinspection or measurement apparatus suitable for inspecting or measuringan object using an image thereof enlarged by, for example, an opticalmicroscope.

[0002] For example, JP-B-6-103168 describes a basic configuration of asize inspection/measurement apparatus. In the apparatus, as can be seenfrom FIG. 2, an image of an object 2 projected by an optical microscopy1 is picked up by a video camera 3. A size measurement processor 40electrically measures sizes of desired sections of the image obtained bythe video camera 3. The image and values of sizes of the object 2 aredisplayed on a video monitor 5.

[0003]FIG. 3 shows an example of an image displayed on a screen of thevideo monitor 5 during the size measurement. L1 to Li indicate scanninglines. As shown in FIG. 3, for each horizontal scanning line Li of animage 55 of the object 2 picked up by the video camera 3 and displayedon the video monitor 5, a luminance-pixel characteristic is obtained foreach pixel position determined by dividing a video signal of thescanning line Li by N and according to luminance of the pixel position.FIG. 4 shows a graph of the luminance-pixel characteristic in which anordinate indicates luminance and an abscissa indicates pixel positions.The sizes are obtained according to the characteristic in a processingmethod of the prior art. In the luminance distribution of FIG. 4, amaximum luminance level 51 and a minimum luminance level 52 are assumedto be 100% and 0%, respectively. A positional difference Nab between ana-th pixel and a b-th pixel, which each correspond to a luminance levelVsl of 50% of the maximum luminance level 51, is obtained. Thepositional difference Nab is multiplied by a coefficient k determinedaccording to a magnification factor of the microscope 1 and a distancebetween the video camera 3 and the object 2 to obtain a value of size Xof the object 2. Namely, X=K·Nab is calculated.

SUMMARY OF THE INVENTION

[0004] The technique of the prior art has been employed to measure widthof a line. That is, as can be seen from FIG. 3, the object of whichsizes are to be measured is clear and hence a width of the object 2 canbe obtained. Therefore, by setting an upper limit value and a lowerlimit value to the size, acceptability of the object to be measured canbe determined, that is, good/bad decisign of the object can be made. Inthe prior art example, it is assumed that a contour of the object isvertical to the measuring direction.

[0005] However, in a case in which the object 25 has rounded corners asshown in FIG. 5 or in which the image is obscure because the opticalmicroscope is used with a magnification factor near its limit, when itis desired to determine by the apparatus whether or not its size is in arange of predetermined values or whether or not its contour isacceptable, measurement of sizes of the object 25 and determination ofacceptability of the contour of the object 25 become difficult for thefollowing reasons.

[0006] When it is desired to measure length, for example, from a cornerc to a corner d of the object 25, it is difficult to identify a scanningline to measure the length between the corners and the measurement isattended with a large amount of error. As can be seen from FIG. 5, itcan be appreciated that line width Wi measured using the scanning lineLi is less than line width Wi+n measured using the scanning line Li+n.That is, between Wi measured by assuming that angles c and d are on thescanning line Li and Wi+n measured by assuming that angles c and d areon the scanning line Li, an error of Wi−Wi+n appears.

[0007] Even if n is assumed to be one, the error for one scanning linetakes place easily when the object 25 is moved only by slight vibrationof the measurement apparatus.

[0008] It is therefore an object of the present invention to provide asize inspection or measurement method and a size inspection ormeasurement apparatus which can measure sizes of an object of which ameasurement position is not easily determined and which can determineacceptability of the contour of the object.

[0009] To achieve the object, there is provided a size inspection ormeasurement method according to one aspect of the present inventionincluding a step, in a teaching stage, of inspecting an acceptable orgood item or of detecting a contour of an object to be measured and astep of registering positions of the contour detected and therebypreparing reference contour positions registered. In the inspection orthe measurement, the reference registered positions are compared withpositions of a contour of an inspection or measurement object and thenpositions having highest correlation with the reference registeredpositions are set as contour positions of a size measurement location.For example, contours of reference angles are beforehand registered. Inthe measurement of an inspection object, a position having highestcorrelation with respect to the registered contour of angle is detectedand is set as a position of an angle and another angle is detected in asimilar fashion to inspect or to measure a size between these angles.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The foregoing and other objects, features, and advantages of thepresent invention will be apparent from the following more particulardescription of the embodiments of the invention as illustrated in theaccompanying drawings wherein:

[0011]FIG. 1 is a block diagram showing an embodiment of a sizeinspection or measurement apparatus according to the present invention;

[0012]FIG. 2 is a block diagram showing a size inspection/measurementapparatus of the prior art;

[0013]FIG. 3 is a diagram useful to explain operation of the apparatusshown in FIG. 2;

[0014]FIG. 4 is a diagram for explaining operation of the apparatusshown in FIG. 2;

[0015]FIG. 5 is a graph for explaining problems of a size measurementmethod of the prior art;

[0016]FIGS. 6A and 6B are diagrams for explaining a principle of a sizemeasurement method of the present invention;

[0017]FIG. 7 is a graph for explaining an embodiment shown in FIG. 1 ofthe present invention;

[0018]FIG. 8 is a table for explaining the embodiment of FIG. 1;

[0019]FIG. 9 is another table for explaining the embodiment of FIG. 1;

[0020]FIG. 10 is a map for explaining the embodiment of FIG. 1;

[0021]FIG. 11 is a graph for explaining an alternative method ofobtaining contour positions in the embodiment of FIG. 1;

[0022]FIG. 12 is a diagram for explaining a method of obtaining lengthbetween edges in the embodiment of FIG. 1;

[0023]FIG. 13 is a diagram for explaining a method of expressing pixelpositions to obtain length of an object to be measured;

[0024]FIG. 14A is a diagram showing appearance of a wafer on which aplurality of bars each including a plurality of magnetic heads areformed;

[0025]FIG. 14B is a diagram showing a cross-sectional view of a barseparated from the wafer of FIG. 14A;

[0026]FIG. 14C is a diagram showing a cross-sectional view of magneticheads arranged on the bar which is obtained by machining the bar shownin FIG. 14B;

[0027]FIG. 15 is a magnified view of a magnetic head on a video monitor;

[0028]FIG. 16A is a flowchart showing operation in a teaching stage of asize inspection or measurement method of another embodiment according tothe present invention;

[0029]FIGS. 16B and 16C are diagrams to explain the flowchart of FIG.16A;

[0030]FIG. 17 is a flowchart showing operation in another teaching stageof a size inspection or measurement method of the embodiment of FIG.16A; and

[0031]FIG. 18 is a flowchart showing operation in a size inspection ormeasurement stage of the size inspection or measurement method of theembodiment of FIG. 16A.

DESCRIPTION OF THE EMBODIMENTS

[0032] First, the principle of the present invention will be describedin detail. Assume that the measurement direction of the object to bemeasured is set to, for example, an x-axis direction. In a predeterminedregistration range, there is detected a contour (i.e., coordinates) inan y-axis direction of a reference item or object, i.e., an acceptableitem for respective x coordinate values in a teaching stage. Positionsof pixels thus detected are registered as a group of contour positionsinto a registration device. In a measurement or inspection stage, theregistered pixels are compared with the contour (coordinates) in they-axis direction for the respective x coordinate values of themeasurement object to thereby extract data of correlation within apredetermined measurement (inspection) range. A position having highestcorrelation is determined as a position of an angle for the sizemeasurement. This is conducted for an angle at a right side of themeasurement object and for an angle at a left side thereof. Thepredetermined measurement (inspection) range (area) is beforehand set toa range (area) which includes the predetermined registration range andwhich is larger than the predetermined registration range.

[0033] The principle of the present invention will be further describedby referring to FIG. 5 and FIGS. 6A and 6B.

[0034]FIGS. 6A and 6B show detection of angles c and d of the object 25shown in FIG. 5.

[0035] First, the angle c of the object 25 will be described. For aregistration range E, a contour of an acceptable or good object isregistered. FIG. 6B shows a magnified view of a section of the angle cin FIG. 6A. One rectangle of FIG. 6B corresponds to one pixel of a videocamera. Next, in a measurement stage, correlation is obtained betweenimage data in a detection range (area) and an image in the registrationrange E. A position having high correlation is set as a position of theangle c of the object. The same operation is conducted also for theangle d.

[0036] In the present invention, according to information on distancebetween particular sections (e.g. corners), whether or not a distancebetween particular sections of an object is equal to a predetermineddistance can also be determined.

[0037] Next, an embodiment of the present invention will be described byreferring to the drawings. In the drawings, the same members areassigned with the same reference numerals.

[0038]FIG. 1 shows in a block diagram an embodiment of a size inspectionor measurement apparatus of the present invention. The configuration ofthe diagram includes a decision or judge (size measurement) processor 4including a frame memory 41, a high-resolution memory 42 and a centralprocessing unit (CPU) 43. Further, an xy stage 6, an xy driver 7, and aninspection object 2 are provided. In response to a signal from the CPU43, the xy driver 7 drives xy stage 6 to move the object 2 to anappropriate position for an optical microscope.

[0039] As above, the processor 4 includes the frame memory 41, thehigh-resolution memory 42 containing data generated according tocontents of the frame memory 41, and the CPU 43. Since resolution of thecorrelation is in the pixel unit including a virtual pixel, thehigh-resolution memory 42 is disposed to improve the resolution. In theexample of the embodiment, the frame memory 41 has a capacity associatedwith the number of pixels of a camera as (H) 640 pixels X (V) 512 pixelsX (C) 8 bits, where H, V, C indicate the horizontal, vertical, andluminance directions, respectively. The high-resolution memory 42 isalso disposed to store virtual pixels inserted between adjacent pixelsto indicate intermediate luminance therebetween.

[0040] The high-resolution memory 42 includes (H) 1279 pixels X (V) 1023pixels X (C) 8 bits, where H, V, C indicate the horizontal, vertical,and luminance directions, respectively. These memories store referenceimage data in the teaching stage and data of an object to be measured.These memories are used during the comparison processing.

[0041] 1. Reference pattern registration

[0042] First, an acceptable or good pattern which is called a referencepattern is registered using a model sample. The registration will bedescribed by referring to FIGS. 6A and 6B. Using a mouse, not shown, theuser registers the reference pattern by personally checking an image onthe monitor.

[0043] The CPU 43 instructs the xy driver 7 to move the xy stage 6 sothat an object to be measured enters a field of view of the opticalmicroscope 1.

[0044] An image projected by the microscope 1 is picked up by the videocamera 3 and is fed to the size measurement processor 4. The processor 4sends a signal of the image to the video monitor 5. The monitor 5displays an image on its screen. After the size measurement, the CPU 43instructs the xy driver 7 to move the xy stage 6 to measure a subsequentobject. Thereafter, the user conducts operation by watching images onthe screen of the monitor 5.

[0045] To register a detection range or area F larger than theregistration range or area E, the user first clicks the mouse button ata starting point (an upper-left corner of an angle section as an objectof inspection) on the screen and drags the mouse to an end point(typically, a lower-right corner of the inspection object) and thenreleases the mouse button. The detection range F (i.e., an inspectionwindow) shown in FIG. 6 is thus registered. Subsequently, the usersimilarly operates the mouse to register the registration range E (whichis within the range F and is indicated by E) in almost the sameprocedure as for the detection range F. The setting is conducted forright and left corners. For simplification of the drawings, theregistration range E is not remarkably different in size from thedetection range F in FIGS. 6A and 6B. However, the detection range F isoften quite larger than the registration range E in ordinary casesunless there exists another image similar to an image displayed in thedetection range F. For example, in an extreme case, the detection rangeF is the entire range of the view of the camera. It is essential thatthe detection range F be set to include a location to be measured on theinspection object.

[0046] Next, description will be given of registration of a contour ofthe reference pattern object. This is achieved by extracting a contourof an image picked up.

[0047] In the registration range E, a line of the contour is representedby pixels 61 to 63 indicated by shaded sections in FIG. 6B.

[0048] Positions of the pixels are obtained as follows. In general, itis impossible to obtain a position or an area smaller than a pixel. Inthis case, such a position is determined using a luminance level ratio.This will be described by referring to FIG. 13. Assume that a positionof an a-th pixel is determined in FIG. 13. When luminance equivalent toa luminance level 53 (Vsl of FIG. 4) is between an n-th pixel and an(n+1)-th pixel, luminance levels respectively of pixels at the n-th and(n+1)-th positions are assumed to be Vn and Vn+1. The position of thea-th pixel can be approximated as follows. Position of a-thpixel=n+(Vn−Vsl)/(Vn−Vn+1) where, n indicates a pixel position and is apositive integer, Vn and Vn+1 are luminance levels attained from a videocamera, and Vsl is a luminance level of 50%.

[0049]FIG. 8 shows results of contour positions of the pixels 61 to 63determined in the method. FIG. 8 shows a relationship between ahorizontal order m and contour positions Sm in the registration range E.

[0050] As can be seen from FIG. 8, in the registration range E, acontour position m1 (FIG. 6B) is at a 5.5-th pixel from above, m2 is ata 3.2-th pixel, and m3 is at a 2.8-th pixel. In a similar way, FIG. 9shows a contour position Dm with respect to a horizontal position h inthe detection range F. In FIG. 9, the horizontal position h correspondsto positions h0 to h7 of FIG. 6B. Although no contour line exists for h0and h1, a maximum value of “8” is set.

[0051] The reference patterns are set to the registration range E andthe detection range F as above and the teaching is thereby terminated.

[0052] 2. Measurement and inspection

[0053] Referring to FIG. 10, description will be next given of a patternmatching step between the reference pattern obtained by the teaching andan inspection object. FIGS. 8 and 9 are referred to respectively as areference pattern and an inspection object in the description. FIG. 10shows correlation between a contour of an image obtained from theinspection object and an image in the detection range F registered. A1to A6 arranged in a vertical direction (generally represented as Ax,where x=1, 2, . . . ) are associated with a positional order ofhorizontal pixels and respectively indicate contour positions in thevertical direction. A value in a rectangle indicates an absolute valueof difference between a contour position Sm registered by the teachingand a contour position Dm of the measurement object 25.

[0054] First, values of correlation are obtained between the inspectionor measurement object 25 as the inspection object (FIG. 9) and thereference pattern (FIG. 8) set as above. As can be seen from FIGS. 8 and9, the correlation values are obtained by determining an absolute-valuedifference Ah between the registered contour positions (FIG. 8) and thedetection contour positions (FIG. 9).

[0055] That is, the correlation is obtained by sequentially andhorizontally moving the contour position Dm in the inspection object 25shown in FIG. 9 and the registered contour position Sm of FIG. 8 in apixel-by-pixel manner. For example, by comparing horizontal positions 0,1 and 2 of FIG. 9 with horizontal order 1, 2 and 3 of FIG. 8, there areobtained differences of horizontal contour positions 2.5, 4.8, and 2.7as shown in a row A1 of FIG. 10. Thereafter, the correlation is attainedby moving the registration range E in a pixel-by-pixel way. Details ofthe operation will be described later.

[0056] Next, the absolute-value differences are added to each other inthe direction of h to calculate a sum of differences. FIG. 10 shows thesum of differences for each row. For a smallest sum, there is determinedAx which has the largest correlation and which is a contour position ofthe inspection or measurement object 25. In the case of FIG. 10, A3 isthe contour position. Namely, the horizontal contour position can berecognized as the third position in the detection range F.

[0057] Therefore, a left-side contour position L=3 is determined toobtain a size W of the angle section of the object 25.

[0058]FIG. 7 shows a graph of a relationship between values ofcorrelation and the absolute-value difference Ax in the horizontaldirection. Since data of the reference pattern is employed as theinspection object 25 in the example, a real line a is drawn for theleft-side size of the embodiment. That is, the data of the referencepattern is employed as the inspection object 25 in the example and hencethe registered image is substantially identical to the image in thedetection range. The graph indicates that the value of correlation takesa maximum value for Ax=0. However, in an actual measurement, data shownin FIG. 9 is data from the measurement or inspection object.Consequently, the image of FIG. 8 is similar to the registered image,but it is not completely equal to the registered image in ordinarycases. As a result, a graph of a dotted line b is obtained. In such acase, it is also possible that a threshold level S is set to the graphof the dotted line b as shown in FIG. 11 to determine E1 and E2. Acontour position L can be obtained as L=(E2+E1)/2.

[0059] Subsequently, as shown in FIG. 12, there is obtained the size Wbetween the registered corners E1 and E2 of two corner sections(patterns) determined on the object 25 by the pattern matching.

[0060] In the determination of the length W, the right-side contourposition R of the right-side contour (registered range E2) can beobtained in almost the same procedure as for the position L. The size Wis attained as

W=k*(R−L)

[0061] where, k is a coefficient determined by the magnification factorof the optical system.

[0062] The size between the angle sections, i.e., the edge sections ofthe measurement object can be measured in this fashion.

[0063] It is possible to determine or identify a location having ahighest value of correlation in the detection range of the image.However, two or more kinds of images in the registered range may besimilar to the registered image. In this situation, the detection rangemust be beforehand made narrow.

[0064] When the size is obtained, it is determined whether or not thesize is in a predetermined range, and acceptability of the measurementor inspection object is thereby determined. Reference data for thedecision may be attained through a teaching step or predetermined designvalues may be beforehand set as data.

[0065] Although the system includes a high-resolution memory 42 in thedescription, the memory 42 can be dispensed with. It is naturallypossible that the system appropriately functions with the frame memory42 alone. In place of the high-resolution memory 42, a work memory maybe disposed to store therein and to search for data necessary for theoperation.

[0066] It is to be appreciated that the contour for which thecorrelation is obtained is not limited to a corner section.

[0067] In the description of the teaching and the inspection ormeasurement, contour pixels are extracted in a direction different fromthe size measuring direction of the measurement or inspection object asshown in FIG. 6. That is, the contour pixels are obtained in the form ofcontour positions Dm in a vertical direction at a horizontal position h.This however does not restrict the determination of contour positions.The contour may be naturally obtained in the form of contour positionsin a horizontal direction at a vertical position. In this case, theoperation may be conducted from either sides, i.e., the right and leftsides.

[0068] Referring next to FIGS. 14A to 14C, 15, 16A to 16C, 17, and 18,description will be given of another embodiment of a size inspection ormeasurement method according to the present invention.

[0069]FIGS. 14A to 14C show an outline of a production process ofmagnetic heads in which the magnetic heads are to be measured. As can beseen from FIG. 14A, magnetic heads are produced on wafers in anintegrated device production process. A large number of magnetic headsare formed on each bar on a wafer. FIG. 14B shows one bar separated fromthe wafer. In the bar, magnetic head devices and positioning markers areformed in pair. The separated bar is lapped up to a position indicatedby a broken line shown in FIG. 14B. After the lapping, measurement isconducted to determine fine sizes of each device of the bar. Accordingto results of the measurement, acceptability of the device isdetermined. Thereafter, each magnetic head is cut away from the bar.

[0070]FIG. 15 schematically shows a magnified view of an image of amagnetic head displayed on a video monitor. However, an actual imageobtained by an optical microscope is more obscure than the image of FIG.15. As above, after the lapping step, measurement is conducted todetermine fine sizes on a pole surface of each magnetic head of the bar.That is, gap length, track width, pole length, and the like areautomatically measured at a time in a method of the present invention.Table 1 below shows an example of specifications of the measurement. Ascan be seen from Table 1, when various magnetic heads such as a GMR headare measured by an optical microscope, sizes of the measurement objectsranges in the order from submicrons to microns. This leads to a problemthat a sharp image cannot be obtained because of limited performance ofthe optical microscope. However, according to the present invention, themeasurement can be achieved in this order of size with high precision.TABLE 1 Item Specification contents Specification 1 Measurement purposeMagnetic head characteristic inspection 2 Gap length measurement ±0.01μm repeatability 3 Pole length measurement ±0.01 μm repeatability 4Track width measurement ±0.02 μm repeatability 5 Shield widthmeasurement 1˜10 μm width 6 Shield width measurement ±0.01 μmrepeatability 7 Measurement screen About 24 μm × 18 μm 8 Measurementobject GMR/MR head Inductive head Various magnetic heads

[0071]FIGS. 16A, 17, and 18 are flowcharts of processing to measurewidth of an object, for example, upper width of a write track shown inFIG. 15.

[0072]FIG. 16A shows in a flowchart a teaching step of a referencecontour pattern of a left-side contour of an object. FIGS. 16B and 16Care diagrams for explaining detection of contour positions.

[0073] In FIG. 16A, an image of a reference pattern of a magnetic headis first picked up (step 160). Next, the user registers a detectionrange (area) by personally checking the reference pattern thus picked up(step 162). The detection range may be registered onto thehigh-resolution memory 42 or onto a work memory (not shown) disposed inplace of the memory 42. As above, the user sets the detection rangelarger than a registration range (area) by using, for example, a mouse.In step 164, the user sets the registration range. In the operation, theuser also operates the mouse to set the registration range within thedetection range. Next, a group of contour positions are detected for areference pattern within the registration range (step 166). The group ofcontour positions detected are registered to the main memory (step 168).

[0074] As can be seen from FIGS. 16B and 16C, contour positions arefirst detected on a line of pixels at m=1 in a vertical direction.Assume that on line h-h′ for m=1, maximum luminance is 100% and minimumluminance is 0%. A position for a luminance of 50% is detected as acontour position. Resultantly, for example, in the case of FIGS. 6A and6B, contour positions are detected as shown in FIG. 8. That is, the5.5-th pixel is a contour position in the vertical direction at m=1, the3.2-th pixel is a contour position in the vertical direction at m=2, andthe 2.8-th pixel is a contour position in the vertical direction at m=3.

[0075] The setting of the registration range and the detection range andthe measurement of the contour positions are carried out using an upperedge of the screen as a reference position.

[0076]FIG. 17 is a flowchart of a teaching operation of a referencecontour pattern of a right-side contour section in the inspection ormeasurement location. The flowchart is substantially the same as that ofthe teaching of the reference contour pattern of the left-side contoursection shown in FIG. 16A and hence description thereof will be avoided.

[0077]FIG. 18 is a flowchart of inspection or measurement processing.

[0078] In the flowchart, an inspection object pattern of an inspectionobject is first picked up (step 180). In the operation, the xy stage 6moves the inspection object into a view field of the optical microscope.Next, a left-side corner section of the inspection pattern is processedas follows. First, a registered contour position Sm (FIG. 8) on the leftside of the reference pattern is called or obtained (step 182). Acontour position Dm (FIG. 9) of the inspection pattern is then detectedwithin the detection range (step 184). A group of Dm is compared with agroup of Sm (step 186) to attain A=|Dm−Sm|. The smaller A is, the higherthe correlation between Dm and Sm is. A position at which thecorrelation takes a maximum value is set as L (distance from the leftedge of the screen to the detection range; step 188).

[0079] The calculation of A=|Dm−Sm| is achieved in an example of FIGS.6A, 6B, 8, 9, and 10 as follows.

[0080] Row A1: Differences between Dm for horizontal order h=0, 1, 2 andSm for m=1, 2, 3;

[0081] Row A2: Differences between Dm for horizontal order h=1, 2, 3 andSm for m=1, 2, 3;

[0082] Row A3: Differences between Dm for horizontal order h=2, 3, 4 andSm for m=1, 2, 3;

[0083] •

[0084] •

[0085] •

[0086] Row A6: Differences between Dm for horizontal order h=5, 6, 7 andSm for m=1, 2, 3.

[0087] The values of A1 are added to each other to obtain a sum of A1 inh-direction. This is repeatedly executed up to the row A6.

[0088] In the rows A1 to A6, the row A3 having a smallest sum (0 in FIG.10) is a correlation point, and hence this point is set as a detectedcontour.

[0089] As a result, the left-side angle section, namely, the left-sidecontour section (edge section) of the inspection or measurement locationof the inspection object is detected or identified.

[0090] Subsequently, operation is similarly conducted for the right-sidecorner section of the inspection pattern. That is, a registered contourposition Sm (not shown) on the right side of the reference pattern isfirst obtained (step 190). A contour position Dm (not shown) of theinspection pattern is detected within the detection range (step 192). Agroup of Dm is compared with a group of Sm (step 194) to attainA=|Dm−Sm|. A position at which the correlation takes a maximum value isset as R (distance from the left edge of the screen to the detectionrange; step 196). By the processing, the right-side corner section,namely, the right-side corner section (edge section) of theinspection/measurement location of the inspection object is detected oridentified. Thereafter, width W is calculated according to k*(R−L) (step198).

[0091] In the description, the size inspection or measurement isconducted for only one position. It is to be appreciated that referencepatterns of a plurality of size measurement positions can be registeredin the teaching step to automatically inspect or measure such positionsat a time.

[0092] As above, in accordance with the embodiments, length or widthbetween particular contours can be measured, and the size can beobtained using an image produced by substantially the highestperformance of the microscope, namely, an image whose size is in theorder of almost a wavelength of light. The present invention is notlimited to the measurement of width. Namely, it is possible to determinea place in an image, the position having a highest value of correlationwith respect to a group of registered contours. The present invention isalso applicable to the recognition of a position of the place.

[0093] The present invention leads to various advantages. For example,the contour is not limited to that of an corner section. By a contourteaching step and by setting a plurality of contour registration ranges,not limited to two ranges, it is possible to measure the width betweenmore complex contours.

[0094] The specification and drawings are, accordingly, to be regardedin an illustrative rather than a restrictive sense. It will, however, beevident that various modifications and changes may be made theretowithout departing from the scope of the invention as set forth in theclaims.

What is claimed is:
 1. A method of inspecting or measuring sizes of anobject, comprising the steps of: setting contour registration areas atleast at two locations of a reference object; registering contourpositions of said reference object at each of said contour registrationareas; setting an inspection area or a measurement area for aninspection or measurement object; detecting contour positions of saidinspection or measurement object within said inspection or measurementarea; obtaining values of correlation between said contour positions ofsaid inspection or measurement object and said contour positions of saidreference object; and determining a position relating to the highest oneof said values of correlation as a position of said inspection ormeasurement object.
 2. A method according to claim 1 , wherein the stepof setting said inspection area or said measurement area for saidinspection or measurement object includes a step of setting an areawhich is larger than said inspection or measurement area for saidinspection or measurement object.
 3. A method according to claim 1 ,wherein the step of setting said contour positions of said referenceobject is a step of registering contour positions of a good sample.
 4. Amethod according to claim 1 , wherein the step of setting said contourpositions of said reference object is a step of registering designvalues of said contour positions.
 5. A method according to claim 1 ,wherein the step of determining said position relating to the highestone of said values of correlation as the position of said inspection ormeasurement object is a step of compairing said contour positionsregistered of each said reference object with said contour positions ofsaid inspection or measurement object and determining a position forhighest correlation therebetween as a position of said inspection ormeasurement object.
 6. A method according to claim 1 , wherein: the stepof registering contour positions of said reference object includes thestep of detecting contour positions of said reference object; and thestep of detecting contour positions of said reference object and thestep of detecting contour positions of said inspection or measurementobject include the step of calculating a position of a-th pixel asn+(Vn−Vsl)/(Vn−Vn+1) where, Vsl indicates a luminance level of the a-thpixel and is 50% of a maximum luminance level, and Vn and Vn+1respectively indicate luminance levels of n-th and (n+1)-th pixels,respectively.
 7. A method according to claim 1 , further comprising thestep of determining that the contour positions of said reference objectand the position of said measurement object are respectively edgecontour patterns.
 8. A method according to claim 7 , further includingthe step of measuring distance between edge contour patterns of at leastsaid two locations.
 9. In an apparatus for inspecting or measuring sizesof an object, including: an optical microscope; a two-dimensional sensorfor converting an image of an object magnified by the optical microscopeinto an image signal; a display for displaying thereon an image of theimage signal from said two-dimensional sensor; and an operating unitincluding a storage for processing the image signal, a method ofinspecting or measuring the sizes of the object comprising the steps of:setting, on said display, contour registration areas at least at twolocations of a reference object and a measurement area of an inspectionor measurement object; registering, by said operating unit, contourpositions of said reference object at each said registration area;detecting, by said operating unit, contour positions of said inspectionor measurement object within said inspection or measurement area;obtaining, by said operating unit, values of correlation between saidcontour positions of said inspection or measurement object and saidcontour positions of said reference object; and determining, by saidoperating unit, a position for the highest one of the values ofcorrelation as a position of said inspection or measurement object. 10.A method according to claim 9 , wherein the contour positions of saidreference object and the position of said measurement object are edgecontour patterns, respectively.
 11. A method according to claim 10 ,wherein the contour positions of said reference object are edge contourpatterns of a good sample.
 12. A method according to claim 11 , furthercomprising the step of measuring distance between the edge contourpatterns at least at said two locations.
 13. An apparatus for inspectingor measuring sizes of an object, comprising: an optical microscope; atwo-dimensional sensor for converting an image of said object magnifiedby the optical microscope into an image signal; a display for displayingthereon an image of said image signal from said two-dimensional sensor;a first storage for recording therein, as reference contour patterns,contour patterns of edge sections of at least two locations of areference object obtained from said two-dimensional sensor; a secondstorage for storing said contour patterns placed within a predeterminedarea from an image of said inspection or measurement object obtainedfrom said two-dimensional sensor; and a processing unit for comparingsaid reference contour patterns of at least said two locations stored insaid first storage with the contour pattern of the image of saidinspection or measurement object stored in said second storage,determining a contour pattern for the highest value of correlation withrespect to each of said reference contour patterns, and determining thecontour pattern as an edge pattern of said inspection or measurementobject.
 14. An apparatus for inspecting or measuring sizes of an objectaccording to claim 13 , further comprising an operating unit forcalculating distance between edge patterns of said inspection ormeasurement object corresponding to the reference contour patterns,respectively.